# It is recommended to test the script on a local machine for its purpose and effects. # ManageEngine Desktop Central will not be responsible for any # damage/loss to the data/setup based on the behavior of the script. # Description - Script to Set Wallpaper, make sure the image name is given also as a script argument # Parameter - "" # Configuration Type - USER/COMPUTER # Dependancy File - "" , the image is to be added as a dependancy file if [ $# == '1' ]; then path=$(pwd) pic="$path/$1" osascript -e 'tell application "Finder" to set desktop picture to "'"$pic"'" as POSIX file' ret=$? if [ $ret == "0" ]; then echo "Wallpaper set successfully " else echo "Error in executing code" fi exit $ret else echo "Invalid Arguments - Please refer description of the script" exit 1 fi